home *** CD-ROM | disk | FTP | other *** search
/ Internet Surfer 2.0 / Internet Surfer 2.0 (Wayzata Technology) (1996).iso / pc / textfile / faqs / emacs_fa / part5 < prev   
Encoding:
Text File  |  1992-12-26  |  20.3 KB  |  466 lines

  1. Xref: bloom-picayune.mit.edu gnu.emacs.help:7403 comp.emacs:15252 gnu.emacs.gnus:2879 news.answers:3117
  2. Path: bloom-picayune.mit.edu!enterpoop.mit.edu!snorkelwacker.mit.edu!eff!sol.ctr.columbia.edu!spool.mu.edu!hri.com!noc.near.net!news.bbn.com!bu.edu!bigbird!jbw
  3. From: jbw@bigbird.bu.edu (Joe Wells)
  4. Newsgroups: gnu.emacs.help,comp.emacs,gnu.emacs.gnus,news.answers
  5. Subject: GNU Emacs FAQ (5/5, 152-177): Mail and News
  6. Summary: READ BEFORE POSTING.  A regularly posted list of answers to frequently
  7.          asked questions (FAQs) about GNU Emacs and many Emacs Lisp programs.
  8.          Contains pointers to other resources.  Follow "References:" link for
  9.          more metainfo.
  10. Keywords: gnu emacs faq answers frequently asked questions periodic
  11. Message-ID: <GNU-Emacs-FAQ-5.1992.09.22.011020@bigbird.bu.edu>
  12. Date: 22 Sep 92 01:10:20 GMT
  13. Expires: 21 Nov 92 01:10:20 GMT
  14. References: <GNU-Emacs-FAQ-0.1992.09.22.011020@bigbird.bu.edu>
  15. Sender: news@bu.edu
  16. Reply-To: gnu-emacs-faq-maintainers@bigbird.bu.edu
  17. Followup-To: poster
  18. Organization: GNU's Not UNIX
  19. Lines: 443
  20. Approved: news-answers-request@mit.edu
  21. Supersedes: <GNU-Emacs-FAQ-5.1992.06.28.234430@bigbird.bu.edu>
  22.  
  23. Archive-Name: GNU-Emacs-FAQ/part5
  24. Last-Modified: Tue, 22 Sep 1992 01:09:59 GMT
  25. Last-Posted: Tue, 22 Sep 1992 01:10:20 GMT
  26.  
  27.                        GNU Emacs FAQ: Mail and News
  28.  
  29. This portion of the GNU Emacs FAQ list is cross-posted to `gnu.emacs.gnus'
  30. because many of the questions herein deal with GNUS.  See `gnu.emacs.help' for
  31. the rest of the FAQ list.
  32.  
  33. If you are viewing this text in a GNU Emacs Buffer, you can type "M-2 C-x $" to
  34. get an overview of just the questions.  Then, when you want to look at the text
  35. of the answers, just type "C-x $".
  36.  
  37. To search for a question numbered XXX, type "M-C-s ^XXX:", followed by a C-r if
  38. that doesn't work, then type ESC to end the search.
  39.  
  40. A `+' in the 78th column means something was inserted on the line.  A `-' means
  41. something was deleted and a `!' means some combination of insertions and
  42. deletions occurred.
  43.  
  44. Full instructions for getting the latest FAQ are in question 22.  Also see the
  45. `Introduction to news.answers' posting in the `news.answers' newsgroup, or send
  46. e-mail to `mail-server@rtfm.mit.edu' with `help' on a body line, or use FTP,
  47. WAIS, or Prospero to rtfm.mit.edu.
  48.  
  49.  
  50.  
  51. Mail and News
  52.  
  53. 152: How do I change the included text prefix in mail/news followups?
  54.   
  55.   Many people want Emacs to prefix included text with something like ` > '
  56.   instead of with three spaces.  One way is to change the code of the
  57.   function `mail-yank-original' in lisp/sendmail.el that prefixes with
  58.   spaces.  A more flexible solution is to use Supercite, which provides wide
  59.   configurability in how you format included text in replies.  See question
  60.   107.  Both of these solutions work for RMAIL and GNUS.
  61.   
  62.   A related problem is how to prevent Emacs from including various headers
  63.   of the replied-to message.  For this, you should set the value of
  64.   mail-yank-ignored-headers, which takes a regexp value.
  65.   
  66. 153: How do I save a copy of outgoing mail?
  67.   
  68.   Two methods:
  69.   
  70.   1. (setq mail-self-blind t) will result in a `BCC:' header line with your
  71.      address being added to mail composition buffers.  This will cause the
  72.      mail system to send a copy of the mail back to you.
  73.   
  74.   2. (setq mail-archive-file-name (expand-file-name "~/outgoing")) will
  75.      result in an `FCC:' header line with the pathname of ~/outgoing being
  76.      added to mail composition buffers.  When you send the mail, Emacs will
  77.      save a copy of the mail in the file ~/outgoing and then strip off the
  78.      `FCC:' line before actually sending.
  79.   
  80.      WARNING: There is a bug in Emacs 18.58 that prevents mail readers such
  81.      as RMAIL from reading the saved mail messages individually.  See
  82.      question 155.
  83.   
  84.      WARNING: If you are visiting the file ~/outgoing at the time you send
  85.      the mail, this can cause a variety of horrible problems.  Jamie         +
  86.      Zawinski has written a solution for this.                               +
  87.   
  88.   It does not work to put `set record filename' in the .mailrc file.
  89.   
  90. 154: Why doesn't Emacs expand my aliases when sending mail?
  91.   
  92.   * You must separate multiple addresses in the headers of the mail buffer
  93.     with commas.  This is because Emacs supports RFC822 standard addresses
  94.     like this one:
  95.   
  96.       To: Willy Smith <wks@xpnsv.lwyrs.com>
  97.   
  98.     However, you do not need to separate addresses with commas in your
  99.     .mailrc file.
  100.   
  101.     WARNING: Emacs breaks up aliases in the .mailrc file into multiple
  102.     addresses both on commas and on whitespace, regardless of any use of
  103.     quotes.  This is probably a bug.  You can get around this by directly
  104.     setting the value of mail-aliases.
  105.   
  106.   * Emacs normally only reads the `.mailrc' file once per session, when you
  107.     start to compose your first mail message.  If you edit .mailrc, you can
  108.     type "M-ESC (build-mail-aliases) RET" to make Emacs reread .mailrc.
  109.     (You have to include the parentheses where they are shown!)
  110.   
  111.   * Emacs does not interpret vendor-specific additions to the format of the
  112.     .mailrc file such as the `source' command.  It also ignores any `set'
  113.     commands.  The only commands it looks at are `alias' and `group'
  114.     commands.
  115.   
  116. 155: Why does RMAIL think all my saved messages are one big message?
  117.   
  118.   There is a bug for FCC-ed messages in Emacs 18.58 where it adds a timezone
  119.   on the "From " line after the year instead of before the year.  (Before it
  120.   didn't add the timezone at all.)  This is incompatible with the standard
  121.   format for the "From " line, and RMAIL in particular can no longer
  122.   distinguish between the messages.  Karl Berry <karl@cs.umb.edu>, Felix Lee
  123.   <flee@cs.psu.edu>, Nick Gianniotis <nico@japan.sbi.com> and many
  124.   others have all posted patches for this.  Karl's is the simplest and just
  125.   stops Emacs from adding the timezone:
  126.   
  127.     >*** ./ORIG/sendmail.el    Tue Jan 28 16:22:56 1992
  128.     >--- ./sendmail.el    Thu May 14 18:23:48 1992
  129.     >***************
  130.     >*** 285,287 ****
  131.     >        (insert "\nFrom " (user-login-name) " "
  132.     >!           (current-time-string) " " timezone "\n")
  133.     >        (insert-buffer-substring rmailbuf)
  134.     >--- 285,287 ----
  135.     >        (insert "\nFrom " (user-login-name) " "
  136.     >!           (current-time-string) "\n")
  137.     >        (insert-buffer-substring rmailbuf)
  138.   
  139. 156: How can I sort the messages in my RMAIL folder?
  140.   
  141.   Use rmailsort.el by Masanobu Umeda.
  142.   
  143. 157: Why does RMAIL need to write to /usr/spool/mail?
  144.   
  145.   This is the behavior of the `movemail' program which RMAIL uses.  This
  146.   indicates that movemail is configured to use lock files.
  147.   
  148.   RMS writes:
  149.   
  150.     Certain systems require lock files to interlock access to mail files.
  151.     On these systems, movemail must write lock files, or you risk losing
  152.     mail.  You simply must arrange to let movemail write them.
  153.   
  154.     Other systems use the flock system call to interlock access.  On these
  155.     systems, you should configure movemail to use flock.
  156.   
  157. 158: How do I recover my mail files after RMAIL munges their format?
  158.   
  159.   Users who just want to try RMAIL out to see how it works end up trapped
  160.   using it because saved mail in their `mbox' file has been converted into
  161.   an incompatible format (BABYL) that only RMAIL understands.  RMAIL
  162.   provides no obvious way to reverse this transformation.  Kyle Jones has    +
  163.   aptly named this "the great Emacs Mail Eating Monster".  To convert a mail +
  164.   file back to standard Unix format, there are several methods:
  165.   
  166.   * Use the rmail-output ("C-o") command within RMAIL on each message in the
  167.     file.  First use M-x rmail or M-x rmail-input to visit the RMAIL file in
  168.     Rmail mode.  Type "1 j" to go to the first message.  Use the C-o command
  169.     to output the message to a Unix format file.  Type "n" to go to the next
  170.     message.  Repeat.
  171.   
  172.   * If the file contains hundreds of messages, you may not want to repeat
  173.     this for all of them.  Instead of the above, after getting to the first
  174.     message type this (where "mbox" is the file you want to put the messages
  175.     in):
  176.   
  177.       C-x ( C-o mbox RET M-s ^From: RET M-0 C-x )
  178.   
  179.     (The rmail-search command ("M-s") is used instead of just "n" because it
  180.     is the only command which will cause an error when it reaches the last
  181.     message in the file, which is necessary to terminate the keyboard macro.
  182.     This will fail if there are messages in the file that don't have a
  183.     `From:' header.  This assumes rmail-delete-after-output is nil.)
  184.   
  185.     It is wise to save a copy of the RMAIL file first, in case you make a
  186.     mistake.
  187.   
  188.   * There are software packages available for converting files or even
  189.     entire directories of BABYL files to standard Unix format.  These are
  190.     helpful in this situation, but are intended mainly for people who have
  191.     used RMAIL for a long time and are converting to some other mail reader.
  192.     Lookup `rmail', `vm', and `babyl' in the Emacs Lisp Archive (see
  193.     question 89).
  194.   
  195.   You may wish to disable RMAIL to avoid accidentally destroying your mbox
  196.   file (I have this in my .emacs):
  197.   
  198.     (put 'rmail 'disabled t)        ; avoid mbox destruction
  199.   
  200. 159: How do I make Emacs automatically start my mail/news reader?
  201.   
  202.   Example:
  203.   
  204.     emacs -f gnus
  205.   
  206.   Also:
  207.   
  208.     alias gnus 'emacs -f gnus'
  209.   
  210.   It is probably unwise to automatically start your mail or news reader from
  211.   your .emacs file.  This would cause problems if you needed to run two
  212.   copies of Emacs at one time.  Also, this would make it difficult for you
  213.   to start Emacs quickly when you needed to.
  214.   
  215. 160: How do I read news under Emacs?
  216.   
  217.   There are at least three news reading packages that operate inside Emacs.
  218.   `rnews' comes with Emacs.  GNUS and Gnews come separately.  rnews will
  219.   be replaced by GNUS in Emacs 19.
  220.   
  221.   rnews works only with a local news spool directory.  Both GNUS and Gnews
  222.   handle reading news remotely via NNTP in addition to reading from a local
  223.   news spool.  GNUS supports reading mail stored in MH folders or articles
  224.   saved by GNUS.
  225.   
  226.   Gnews is styled after `rn' and seems to work like RMAIL.  GNUS feels more
  227.   like VM.  People have complained that GNUS uses a lot of CPU time (it
  228.   does).  Some people have complained that Gnews is slower than GNUS.
  229.   
  230.   For more information about GNUS, see question 108.
  231.   
  232.   Gnews was written by Matthew P. Wiener <weemba@libra.wistar.upenn.edu>.
  233.   The latest version seems to be 2.0, posted October 3, 1988.  Matthew
  234.   posted some fixes on October 26, 1988.  Gnews does not appear to have been
  235.   supported after this date.  In particular, it has been reported that Gnews
  236.   does not work with Emacs 18.57.  There is a newsgroup for Gnews called
  237.   gnu.emacs.gnews.
  238.   
  239. 161: Why does `rnews' say "No News is good news" when there is news?
  240.   
  241.   rnews doesn't speak NNTP.  You may need to use GNUS or Gnews.
  242.   
  243. 162: Why doesn't GNUS work anymore via NNTP?
  244.   
  245.   There is a bug in NNTP version 1.5.10, such that when multiple requests
  246.   are sent to the NNTP server, the server only handles the first one before
  247.   blocking waiting for more input which never comes.  NNTP version 1.5.11
  248.   claims to fix this.
  249.   
  250.   You can work around the bug inside Emacs like this:
  251.   
  252.     (setq nntp-maximum-request 1)
  253.   
  254.   I also have a patch for NNTP 1.5.10 by Mike Pelletier
  255.   <stealth@engin.umich.edu> that is based on the timeout code that was in
  256.   1.5.9.  However, please try to upgrade to 1.5.11 first.
  257.   
  258.   You can find out what version of NNTP your news server is running by
  259.   telnetting to the NNTP port (usually 119) on the news server machine (ie.,
  260.   `telnet server-machine 119').  The server should give its version number
  261.   in the welcome message.  Type `quit' to get out.
  262.   
  263. 163: How do I view text with embedded underlining (eg., ClariNews)?
  264.   
  265.   Underlining appears like this:
  266.   
  267.     _^Hu_^Hn_^Hd_^He_^Hr_^Hl_^Hi_^Hn_^Hi_^Hn_^Hg
  268.   
  269.   You can destructively remove underlining with M-x ununderline-region.
  270.   
  271.   For ClariNews articles, clari-clean.el by David N. Blank-Edelman
  272.   <dnb@meshugge.media.mit.edu> will remove both underlining and overstriking
  273.   automatically.
  274.   
  275. 164: When I try to post a long article in GNUS (about 10K or longer), I get
  276.  the error, "Writing to process: no more processes, nntpd"
  277.   
  278.   Upgrade to Emacs 18.58.
  279.   
  280. 165: How do I save all the items of a multi-part posting in GNUS?
  281.   
  282.   Use gnus-mark.el by Jamie Zawinski <jwz@lucid.com>.
  283.   
  284. 166: Why does GNUS put the subjects in replies beyond the 80th column?
  285.   
  286.   This is a feature.  If you set gnus-thread-hide-subject to non-nil, GNUS
  287.   will only display the subject of the first posting in a thread, even if
  288.   some of the replies use different subjects.  It hides the subjects by
  289.   putting them past the edge of the window and setting truncate lines to t.
  290.   
  291.   If your screen looks messed up, then for some reason truncate-lines in
  292.   your `*Subject*' buffer has been set to nil.  It should be set to t.
  293.   
  294.   (I have an enhancement to GNUS 3.13 that will make it only hide the subject
  295.   of a posting when it is unchanged from the followed-up-to posting.  Thus,
  296.   you can use the subject hiding feature and still know when someone changes
  297.   the subject.  (I have forgotten who originally gave me the idea for this.))
  298.   
  299. 167: Why is GNUS so slow to start up?
  300.   
  301.   GNUS does several things that take quadratic time of the number of
  302.   newsgroups that are listed in .newsrc.  The quick fix for this is to
  303.   remove all the newsgroups in which you have no interest from your .newrc
  304.   file by using GNUS's C-k command in the `*Newsgroup*' buffer after
  305.   displaying all newsgroups with the L command.  If you were to directly
  306.   edit your .newsrc to remove the newsgroups, GNUS would add them back.
  307.   
  308.   GNUS uses a quadratic algorithm to check for duplicates when the .newsrc
  309.   file is newer than the .newsrc.el file (ie., you edited your .newsrc).
  310.   GNUS uses a quadratic algorithm to check for new newsgroups every time it
  311.   connects to the news server.  {There may be other quadratic algorithms
  312.   that I am not aware of.}
  313.   
  314.   You can speed up GNUS by using the C-k command in the *Newsgroup* buffer
  315.   to remove newsgroups from your .newsrc file.
  316.   
  317.   Of course, GNUS will run faster if you make sure it is byte-compiled.
  318.   
  319.   Felix Lee wrote some enhancements called `gnus-speedups.el' that fix some  +
  320.   of the problems.  See the Emacs Lisp Archive.                              +
  321.   
  322. 168: How do I catch up all newsgroups in GNUS?
  323.   
  324.   In the `*Newsgroup*' buffer, type the following magical incantation:
  325.   
  326.     M-< C-x ( C-@ c y C-u C-@ C-e C-f C-f M-0 C-x )
  327.   
  328.   Leave off the "M-<" if you only want to catch up from point to the end of
  329.   the `*Newsgroup' buffer.
  330.   
  331. 169: Why can't I kill in GNUS on the Newsgroups/Keywords/Control line?
  332.   
  333.   GNUS 3.14.1 will complain that the `Newsgroups:', `Keywords:', and
  334.   `Control:' headers are `Unknown header field's.
  335.   
  336.   For the `Newsgroups:' header, there is an easy workaround: kill on the
  337.   `Xref' header instead, which will be present on any cross-posted article.
  338.   
  339.   If you really want to kill on one of these headers, you can do it like
  340.   this:
  341.   
  342.     (gnus-kill nil "^Newsgroups: .*\\(bad\\.group\\|worse\\.group\\)")
  343.   
  344.   Various people (eg., Greg Holley <holley@acuson.com>) have posted
  345.   solutions to allow more efficient killing on these headers than the
  346.   preceding solution.  Masanobu Umeda plans to fix this problem.
  347.   
  348. 170: How do I get rid of flashing messages in GNUS for slow connections?
  349.   
  350.   GNUS outputs "NNTP: Reading..." message and then clears them, over and
  351.   over.  In version 3.14.1 there is a variable named nntp-debug-read that
  352.   can help.  Johan Vromans <jv@mh.nl> wrote a fix.  Others have also written
  353.   fixes.
  354.   
  355. 171: Why is catch up slow in Gnews/GNUS?
  356.   
  357.   Because GNUS is marking crosspostings read.  {I think it should do this at
  358.   the time the article is read to spread out the load.  Maybe someone will
  359.   write the code to do this.}
  360.   
  361. 172: Why does GNUS hang for a long time when posting?
  362.   
  363.   David Lawrence <tale@uunet.uu.net> explains:                               !
  364.                                                                              !
  365.     The problem is almost always interaction between NNTP and C News.  NNTP  !
  366.     POST asks C News's inews to not background itself but rather hang around !
  367.     and give its exit status so it knows whether the post was successful.    !
  368.     (That wait will on some systems not return the exit status of the        !
  369.     waited for job is a different sort of problem.)  It ends up taking a     !
  370.     long time because inews is calling relaynews, which often waits for      !
  371.     another relaynews to free the lock on the news system so it can file the !
  372.     article.                                                                 !
  373.                                                                              !
  374.     My preferred solution is to change inews to not call relaynews, but      !
  375.     rather use newsspool.  This loses some error-catching functionality, but !
  376.     is for the most part safe as inews will detect a lot of the errors on    !
  377.     its own.  The C News folks have sped up inews, too, so speed should look !
  378.     better to most folks as that update propagates around.                   !
  379.   
  380. 173: Why don't my news postings in GNUS get past the local machine?
  381.   
  382.   Three possible reasons: local distribution, C News date problem (see
  383.   question 174, and the path problem.  This piece of code may fix the path   !
  384.   problem for you:                                                           !
  385.                                                                              !
  386.     (setq gnus-use-generic-path t)                                           !
  387.   
  388. 174: Why is the GNUS-generated `Date:' header invalid?
  389.   
  390.   GNUS generates `Date:' headers without time zones.  C-News's `inews'
  391.   doesn't replace it with a valid header, but will generate it if not
  392.   already there.  If it is invalid, the article will not be forwarded
  393.   properly.  Quick fix:
  394.   
  395.     (defun gnus-inews-date () nil)
  396.   
  397.   I think this is fixed in GNUS 3.14.1 if you set gnus-news-system {?} to    +
  398.   Cnews.                                                                     +
  399.   
  400. 175: Why doesn't GNUS generate the `Lines:' header?
  401.   
  402.   GNUS was written for B news, which would generate the `Lines:' header.  C
  403.   news doesn't.  There is a comment in C news's `inews' that you can
  404.   uncomment to enable this functionality.  Or you can have GNUS generate the
  405.   header, for example:
  406.   
  407.     ;; idea by jbryans@beach.csulb.edu (Jack Bryans)
  408.     (defun add-lines-header ()
  409.       ;; Count the number of lines in the current posting and insert the
  410.       ;; header line Lines into the message.
  411.       (save-excursion
  412.         (goto-char (point-min))
  413.         (if (search-forward "\n\n") ;; ***** I suspect this is wrong *****
  414.           (let ((lines (count-lines (point) (point-max))))
  415.             (forward-line -1)
  416.             (insert-string "Lines: " lines "\n")))))
  417.   
  418.   Mike Williams <mike-w@cs.aukuni.ac.nz> has written something similar.
  419.   
  420.   Ronald Florence <ron@mlfarm.com> has a patch for GNUS that makes it
  421.   calculate the `Lines:' header for incoming articles when necessary that
  422.   works for sites with local news spools.
  423.   
  424.   David Lawrence <tale@uunet.uu.net> says that GNUS 3.14.1 generates Lines   +
  425.   if gnus-news-system is Cnews.                                              +
  426.   
  427. 176: Why do I get "Cannot open load file" "nntp" when compiling GNUS?
  428.   
  429.   Specifically, the error message is this:
  430.   
  431.     Error occurred processing gnus.el: File error (("Cannot open load file" "nntp"))
  432.   
  433.   This means that nntp.el is not in Emacs's load-path, which is easy to
  434.   happen when compiling using the Makefile.
  435.   
  436.   Easiest solution: set EMACSLOADPATH in Makefile (idea from Glenn Gribble
  437.   <glenn@netcom.com>):
  438.   
  439.     EMACSLOADPATH=/usr/local/emacs/lisp:.
  440.     ELC= env EMACSLOADPATH=$(EMACSLOADPATH) emacs -batch -f batch-byte-compile
  441.   
  442.   Another solution, in hack.el put this:
  443.   
  444.     (defun gross-hack () (setq load-path (cons "/directory" load-path)))
  445.   
  446.   Then in Makefile:
  447.   
  448.     ELC= emacs -batch -l hack.el -f gross-hack -f batch-byte-compile
  449.   
  450. 177: How do I kill all articles in GNUS but those matching a pattern?
  451.   
  452.   Example:
  453.   
  454.     ;; kill everything
  455.     (gnus-kill "subject" "" nil nil)
  456.     ;; then restore stuff by our favorite poster
  457.     (gnus-kill "from" "good-guy"
  458.                (function
  459.                 (lambda ()
  460.                   (if (eq ?X (char-after (save-excursion
  461.                                            (beginning-of-line 1)
  462.                                            (point))))
  463.                       (gnus-Subject-clear-mark-forward 1))))
  464.                t)
  465.   
  466.